<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>「广州招聘信息」广州招聘网 - BOSS直聘</title>
    <link rel="shortcut icon" type="image/x-icon" href="./images/favicon.png">
    <link rel="stylesheet" href="style/main.css">

</head>

<body>
    <div class="container" id="app">
        <div class="list-header flex">
            
            <form action="" class="flex">
                <img src="./images/icon-home.png" alt="">
                <div class="inner  flex">
                    <input type="text" value="web前端">
                    <span>&times;</span>
                </div>
                <button>搜索</button>
            </form>
        </div>
        <div class="filter flex">
            <dl class="active1" v-for="item in filters">
                <dt>{{item.name}}</dt>
                <dd>
                    <ul>
                        <li class="active" v-for="option in item.options">{{option.text}}</li>
                       
                    </ul>
                </dd>
            </dl>
            
        </div>
        <ul class="job-list">
            <li v-for="item in jobs">
                <a href="detail.html" class="job-item flex">
                    <img :src="item.logo" alt="">
                    <div class="text">
                        <div class="title flex">
                            {{item.title}}
                            <span class="salary">{{item.salary}}</span>
                        </div>
                        <div class="company">
                            {{item.company}}
                        </div>
                        <div class="props" >
                            <span v-for="tag in item.tags">{{tag}}</span>
                            
                        </div>
                    </div>
                </a>
            </li>   
              
        </ul>
    </div>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.6.11/vue.min.js" integrity="sha256-ngFW3UnAN0Tnm76mDuu7uUtYEcG3G5H1+zioJw3t+68=" crossorigin="anonymous"></script>
    <script>
        const vm = new Vue({
            el:'#app',
            data:{
                filters:[],
                jobs:[],
            },
            created:function(){
                fetch('http://127.0.0.1:5500/api/filters.json')
                .then(function(res){
                    return res.json()
                })
                .then(function(data){
                    vm.filters =data
                })

                fetch('http://127.0.0.1:5500/api/jobs.json')
                .then(function(res){
                    return res.json()
                })
                .then(function(data){
                    vm.jobs =data
                })
            }
        })
    </script>
</body>

</html>